Skip to content

ci(dependabot): group @vitest/* with dev-tooling#33

Merged
aksOps merged 3 commits intomainfrom
fix-dependabot-vitest-group
Apr 23, 2026
Merged

ci(dependabot): group @vitest/* with dev-tooling#33
aksOps merged 3 commits intomainfrom
fix-dependabot-vitest-group

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented Apr 23, 2026

Fixes #26 and #30 at the root: @vitest/coverage-v8 wasn't in the dev-tooling group pattern, so dependabot split it from vitest. Each PR then broke peer-dep resolution (@vitest/coverage-v8@X requires vitest@X exactly). Grouping them guarantees they move together on the next weekly run.

Without this, vitest and @vitest/coverage-v8 were bumped in separate
PRs (#26, #30) that each broke peer-dep resolution because the sibling
stayed pinned at the old major. Grouping them guarantees they move
together.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aksOps aksOps enabled auto-merge (squash) April 23, 2026 00:47
@aksOps aksOps merged commit bbe1414 into main Apr 23, 2026
11 checks passed
@aksOps aksOps deleted the fix-dependabot-vitest-group branch April 23, 2026 01:04
aksOps added a commit that referenced this pull request Apr 23, 2026
CodeQL alert #33 (Critical): exec.Command("git", ...) in runGit
received user-controlled strings (commit message bytes from author /
subject, and paths from note keys). Although exec.Command uses argv
(no shell) which makes the standard shell-injection vector inert, git
itself has flag-based attack surface (e.g. `--upload-pack=cmd`,
`-c core.sshCommand=...`) that CodeQL is right to flag.

Defense in depth:

1. `runGit` now enforces:
   - notesDir must be non-empty and must not start with "-" (prevents
     it being parsed as a git top-level flag).
   - args[0] must be in a closed allow-list of subcommands (init /
     config / add / log). Commit is deliberately routed elsewhere
     (see #2).
   - Any arg after a literal "--" must satisfy filepath.IsLocal —
     this continues the sanitiser from PR #44 and is what CodeQL
     recognises.

2. `gitCommit` is a new helper that runs `git commit --no-gpg-sign
   -F -` and pipes the message via stdin. The message bytes therefore
   never appear in argv, cutting the only remaining taint flow from
   user input to exec.Command args.

3. autoCommit's commit call switched from runGit(..., "commit", "-m",
   msg) to gitCommit(notesDir, msg).

Tested locally: 104/104 tests passing in internal/notes/.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant